package com.example.swimmingpool.vo.employee;

import com.example.swimmingpool.constants.RegexpConstants;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

import java.time.LocalDate;

@Data
public class EmployeeVo {

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    @NotBlank
    private String name;

    private String avatar;

    @NotNull
    private Integer sex;

    @NotBlank
    @Pattern(regexp = RegexpConstants.PHONE_REGEX, message = "不是正确的手机号")
    private String phone;

    @NotBlank
    private String address;

    @NotBlank
    private String work;

    @NotNull
    private LocalDate birthday;

}
